package com.wander.designBehavioral.observer;

/**
 * @Author : WDYin
 * @Date : 2020/12/9
 * @Desc :
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject = subject;
        subject.addObserver(this);
    }

    @Override
    public void update() {
        System.out.println("Octal String: " + Integer.toOctalString(subject.getState()));
    }
}
